<?php
html::printPath(
    array(
        'viRegistration.form-title' => 'admin/viRegistration/all',
        text::get('viRegistration.registration_number', $viRegistration['id']) => 'admin/viRegistration/display?id=' . $viRegistration['id'],
        'viRegistration.paymentDisplay-title' => ''
    )
);
$msg->printMessages();

$commandMethod = 'anchor';
if (request::is_ajax()) {
    $commandMethod = 'popupForm';
}
?>
<ul class="commandList" style="display: block">
    <li class="editLi"><?php echo html::$commandMethod('admin/viRegistration/paymentEdit?paymentId=' . $payment['id'], text::get('viRegistration.editThisPayment')) ?></li>
    <li class="deleteLi"><?php echo html::anchor('/admin/viRegistration/paymentDelete?id=' . $payment['id'], text::get('viRegistration.deleteThisPayment'), array('onclick'=>'return confirmDeletion()')) ?></li>
</ul>

<?php
$currencyMark = text::get('currency.mark-' . $viRegistration['currency_code']);

$fb = new FormBuilder('viRegistration', $payment);
$fb->displayOnly();
$fb->text('record_number');
$fb->decimal('paid_amount')->appendix($currencyMark);
$fb->textarea('payment_notes');
$fb->date('payment_date');
$fb->time('payment_time');
$fb->write();